#!/bin/bash


if [ $1 = "install" ];then
# Check Python
# Check Scapy

# Install usr/share/netmirror
# Install wrapper in usr/bin
echo Installing Net Mirror
cp -R usr/ /
echo

echo Installing configuration files and init scripts
# Install and update init.d/netmirror
cp -R etc/ /
echo
update-rc.d netmirror defaults
echo
echo Edit /etc/netmirror/config.cfg to setup your installation
echo done.

fi

if [ $1 = "uninstall" ];then
echo Removing init scripts 
/etc/init.d/netmirror stop
update-rc.d -f netmirror remove
rm /etc/init.d/netmirror 
echo

echo Removing configuration files
rm -i /etc/netmirror/* 2>/dev/null
echo

echo Removing netmirror
rm usr/bin/netmirror 
rm -rf /usr/share/netmirror/ 2>/dev/null
echo

echo Removing documentation
rm -rfi /usr/share/doc/netmirror/* 2>/dev/null
echo

fi
#Net Mirror (c) 2009 Pablo Rincon Crespo
